package com.ruoyi.admin.domain.vo.request.profit;

import com.ruoyi.admin.domain.entity.ProfitModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;


/**
 * 报表添加参数实体
 *
 * @author jianhan
 * @date 2022-12-07 15:41:40
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class ProfitUpdateRequest {


    @ApiModelProperty(value = "主键", required = true)
    private Long id;

    @ApiModelProperty(value = "货号id", required = true)
    private Long articleId;

    @ApiModelProperty(value = "库存id", required = true)
    private Long inventoryId;

    @ApiModelProperty(value = "投入金额", required = true)
    private BigDecimal inputAmount;

    @ApiModelProperty(value = "产出金额", required = true)
    private BigDecimal outputAmount;

    @ApiModelProperty(value = "毛利", required = true)
    private BigDecimal grossMargin;

    @ApiModelProperty(value = "备注", required = true)
    private String remark;

    @ApiModelProperty(value = "删除标志（0代表存在 1代表删除）", required = true)
    private Boolean delFlag;

    /**
     * 获取实体对象
     *
     * @return 对象
     * @author jianhan
     * @date 2022-12-07 15:41:40
     **/
    @ApiModelProperty(hidden = true)
    public ProfitModel getProfitModel() {
        ProfitModel profitModel = new ProfitModel();
        BeanUtils.copyProperties(this, profitModel);
        return profitModel;
    }

}
